package gientech.spring.demo.controller;

import gientech.spring.demo.dto.UserChangeEvent;
import gientech.spring.demo.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class UserInfoController {
    @Autowired
    private UserService userService;

    @GetMapping(value = "/transfer")
    public String transfer(){

        UserChangeEvent userChangeEvent = new UserChangeEvent();

        userChangeEvent.setUId("1");
        userChangeEvent.setUUsername("abc");

        userService.doupdateUser(userChangeEvent);
        return "ok";
    }
}
